<template>
  <!-- 百分比 -->
  <el-input
    v-if="props.columnData.fieldTypeCode == 'PERCENT'"
    v-model.trim="props.itemData[props.columnData.fieldCode]"
    :disabled="props.columnData.disabled"
    :precision="props.columnData.digitsFraction ? props.columnData.digitsFraction : 0"
    @blur="handelBlur"
    @change="handelChange"
    clearable
  >
    <template #prepend>
      {{ props.columnData.symbol ? props.columnData.symbol : '' }}
    </template>
  </el-input>
</template>

<script setup>
import { ref, reactive, computed } from 'vue'
import { mixinsData } from '../hooks/mixinsData'

const props = defineProps({
  columnData: {
    type: Object,
    default: () => {}
  },
  itemData: {
    type: Object,
    default: () => {}
  },
  rules: {
    type: Object,
    default: () => {}
  }
})

const { handelBlur, handelChange } = mixinsData(props.columnData, props.itemData, props.rules)
</script>
<style lang="scss"></style>
